﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Thongtintangtruong : System.Web.UI.Page
{
    BUS_ChildrenClass objC = new BUS_ChildrenClass();
    protected void Page_Load(object sender, EventArgs e)
    {
        Hienthi();
    }
    public void Hienthi()
    {
        string childrenid = Session["username"].ToString();
        //Response.Write("<script>alert(\"" + Session["username"] + "\")</script>");
        var dataC = objC.ChildrenClass_getAllByChildrenid(childrenid);
        if (dataC.Rows.Count > 0)
        {
            DateTime ngay = DateTime.Parse(dataC.Rows[0]["date"].ToString());
            lbngay.Text = ngay.ToString("dd/MM/yyyy");
            lbchieucao.Text = dataC.Rows[0]["height"].ToString().Trim();
            lbcannang.Text = dataC.Rows[0]["weight"].ToString().Trim();
            lbsuckhoe.Text = dataC.Rows[0]["healthy"].ToString().Trim();
        }
        else {
            lbngay.Text = "";
            lbchieucao.Text = "";
            lbcannang.Text = "";
            lbsuckhoe.Text = "";
        }
        
    }
}